<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Category</title>
<jsp:include page="/inc/inc.jsp" />
<script type="text/javascript">
	function del(id) {
		if (confirm('确认删除该分类？')) {
			$.post(sys.bp() + '/cate/del/' + id, function(data) {
				if (data && data.success) {
					location.reload();
				}
				alert(data.msg);
			}, 'json');
		}
	}
</script>
</head>

<body>
	<h3>Category List</h3>
	<ul style="padding: 5px;">
		<li>[默认分类]</li>
		<c:forEach items="${catelist }" var="cate">
			<li>[${cate.name }] &nbsp;<small><a
					href="javascript:del('${cate.id }')">删除类别</a></small></li>
		</c:forEach>
	</ul>
</body>
</html>
